3.176 \(\int \frac {(a+b x^2)^2}{x^4 (c+d x^2)} \, dx\)

Optimal. Leaf size=66 \[ -\frac {a^2}{3 c x^3}+\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{c^{5/2} \sqrt {d}}-\frac {a (2 b c-a d)}{c^2 x} \]

[Out]

-1/3*a^2/c/x^3-a*(-a*d+2*b*c)/c^2/x+(-a*d+b*c)^2*arctan(x*d^(1/2)/c^(1/2))/c^(5/2)/d^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {461, 205} \[ -\frac {a^2}{3 c x^3}-\frac {a (2 b c-a d)}{c^2 x}+\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{c^{5/2} \sqrt {d}} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*x^2)^2/(x^4*(c + d*x^2)),x]

[Out]

-a^2/(3*c*x^3) - (a*(2*b*c - a*d))/(c^2*x) + ((b*c - a*d)^2*ArcTan[(Sqrt[d]*x)/Sqrt[c]])/(c^(5/2)*Sqrt[d])

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 461

Int[(((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_))/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Int[ExpandIntegr
and[((e*x)^m*(a + b*x^n)^p)/(c + d*x^n), x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[n
, 0] && IGtQ[p, 0] && (IntegerQ[m] || IGtQ[2*(m + 1), 0] ||  !RationalQ[m])

Rubi steps

\begin {align*} \int \frac {\left (a+b x^2\right )^2}{x^4 \left (c+d x^2\right )} \, dx &=\int \left (\frac {a^2}{c x^4}-\frac {a (-2 b c+a d)}{c^2 x^2}+\frac {(b c-a d)^2}{c^2 \left (c+d x^2\right )}\right ) \, dx\\ &=-\frac {a^2}{3 c x^3}-\frac {a (2 b c-a d)}{c^2 x}+\frac {(b c-a d)^2 \int \frac {1}{c+d x^2} \, dx}{c^2}\\ &=-\frac {a^2}{3 c x^3}-\frac {a (2 b c-a d)}{c^2 x}+\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{c^{5/2} \sqrt {d}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 64, normalized size = 0.97 \[ -\frac {a^2}{3 c x^3}+\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{c^{5/2} \sqrt {d}}+\frac {a (a d-2 b c)}{c^2 x} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^2)^2/(x^4*(c + d*x^2)),x]

[Out]

-1/3*a^2/(c*x^3) + (a*(-2*b*c + a*d))/(c^2*x) + ((b*c - a*d)^2*ArcTan[(Sqrt[d]*x)/Sqrt[c]])/(c^(5/2)*Sqrt[d])

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 192, normalized size = 2.91 \[ \left [-\frac {3 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {-c d} x^{3} \log \left (\frac {d x^{2} - 2 \, \sqrt {-c d} x - c}{d x^{2} + c}\right ) + 2 \, a^{2} c^{2} d + 6 \, {\left (2 \, a b c^{2} d - a^{2} c d^{2}\right )} x^{2}}{6 \, c^{3} d x^{3}}, \frac {3 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {c d} x^{3} \arctan \left (\frac {\sqrt {c d} x}{c}\right ) - a^{2} c^{2} d - 3 \, {\left (2 \, a b c^{2} d - a^{2} c d^{2}\right )} x^{2}}{3 \, c^{3} d x^{3}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2/x^4/(d*x^2+c),x, algorithm="fricas")

[Out]

[-1/6*(3*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*sqrt(-c*d)*x^3*log((d*x^2 - 2*sqrt(-c*d)*x - c)/(d*x^2 + c)) + 2*a^2*
c^2*d + 6*(2*a*b*c^2*d - a^2*c*d^2)*x^2)/(c^3*d*x^3), 1/3*(3*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*sqrt(c*d)*x^3*arc
tan(sqrt(c*d)*x/c) - a^2*c^2*d - 3*(2*a*b*c^2*d - a^2*c*d^2)*x^2)/(c^3*d*x^3)]

________________________________________________________________________________________

giac [A]  time = 0.33, size = 71, normalized size = 1.08 \[ \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{\sqrt {c d} c^{2}} - \frac {6 \, a b c x^{2} - 3 \, a^{2} d x^{2} + a^{2} c}{3 \, c^{2} x^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2/x^4/(d*x^2+c),x, algorithm="giac")

[Out]

(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*arctan(d*x/sqrt(c*d))/(sqrt(c*d)*c^2) - 1/3*(6*a*b*c*x^2 - 3*a^2*d*x^2 + a^2*c
)/(c^2*x^3)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 98, normalized size = 1.48 \[ \frac {a^{2} d^{2} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{\sqrt {c d}\, c^{2}}-\frac {2 a b d \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{\sqrt {c d}\, c}+\frac {b^{2} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{\sqrt {c d}}+\frac {a^{2} d}{c^{2} x}-\frac {2 a b}{c x}-\frac {a^{2}}{3 c \,x^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)^2/x^4/(d*x^2+c),x)

[Out]

1/c^2/(c*d)^(1/2)*arctan(1/(c*d)^(1/2)*d*x)*a^2*d^2-2/c/(c*d)^(1/2)*arctan(1/(c*d)^(1/2)*d*x)*a*b*d+1/(c*d)^(1
/2)*arctan(1/(c*d)^(1/2)*d*x)*b^2-1/3*a^2/c/x^3+a^2/c^2/x*d-2*a/c/x*b

________________________________________________________________________________________

maxima [A]  time = 2.33, size = 71, normalized size = 1.08 \[ \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{\sqrt {c d} c^{2}} - \frac {a^{2} c + 3 \, {\left (2 \, a b c - a^{2} d\right )} x^{2}}{3 \, c^{2} x^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2/x^4/(d*x^2+c),x, algorithm="maxima")

[Out]

(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*arctan(d*x/sqrt(c*d))/(sqrt(c*d)*c^2) - 1/3*(a^2*c + 3*(2*a*b*c - a^2*d)*x^2)/
(c^2*x^3)

________________________________________________________________________________________

mupad [B]  time = 0.13, size = 90, normalized size = 1.36 \[ \frac {a^2\,d}{c^2\,x}-\frac {a^2}{3\,c\,x^3}+\frac {a^2\,d^{3/2}\,\mathrm {atan}\left (\frac {\sqrt {d}\,x}{\sqrt {c}}\right )}{c^{5/2}}+\frac {b^2\,\mathrm {atan}\left (\frac {\sqrt {d}\,x}{\sqrt {c}}\right )}{\sqrt {c}\,\sqrt {d}}-\frac {2\,a\,b}{c\,x}-\frac {2\,a\,b\,\sqrt {d}\,\mathrm {atan}\left (\frac {\sqrt {d}\,x}{\sqrt {c}}\right )}{c^{3/2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^2)^2/(x^4*(c + d*x^2)),x)

[Out]

(a^2*d)/(c^2*x) - a^2/(3*c*x^3) + (a^2*d^(3/2)*atan((d^(1/2)*x)/c^(1/2)))/c^(5/2) + (b^2*atan((d^(1/2)*x)/c^(1
/2)))/(c^(1/2)*d^(1/2)) - (2*a*b)/(c*x) - (2*a*b*d^(1/2)*atan((d^(1/2)*x)/c^(1/2)))/c^(3/2)

________________________________________________________________________________________

sympy [B]  time = 0.65, size = 172, normalized size = 2.61 \[ - \frac {\sqrt {- \frac {1}{c^{5} d}} \left (a d - b c\right )^{2} \log {\left (- \frac {c^{3} \sqrt {- \frac {1}{c^{5} d}} \left (a d - b c\right )^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )}}{2} + \frac {\sqrt {- \frac {1}{c^{5} d}} \left (a d - b c\right )^{2} \log {\left (\frac {c^{3} \sqrt {- \frac {1}{c^{5} d}} \left (a d - b c\right )^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )}}{2} + \frac {- a^{2} c + x^{2} \left (3 a^{2} d - 6 a b c\right )}{3 c^{2} x^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)**2/x**4/(d*x**2+c),x)

[Out]

-sqrt(-1/(c**5*d))*(a*d - b*c)**2*log(-c**3*sqrt(-1/(c**5*d))*(a*d - b*c)**2/(a**2*d**2 - 2*a*b*c*d + b**2*c**
2) + x)/2 + sqrt(-1/(c**5*d))*(a*d - b*c)**2*log(c**3*sqrt(-1/(c**5*d))*(a*d - b*c)**2/(a**2*d**2 - 2*a*b*c*d
+ b**2*c**2) + x)/2 + (-a**2*c + x**2*(3*a**2*d - 6*a*b*c))/(3*c**2*x**3)

________________________________________________________________________________________